<?php 
$req_path="";
require_once($req_path."include/db.php");

class M_authen extends DB{
	function M_authen(){
		parent::__construct();
	}
	function CheckUserAuthen($uid=0,$screenName=""){
		$sql = "SELECT s.ScreenName,g.View, g.Add, g.Edit, g.Deleted
		From tb_user u
		left join tb_group_permission g on u.GroupID= g.GroupID
		left join tb_screen_list s on s.id=g.ScreenID
		where UserID=".$uid." and s.ScreenName='".$screenName."'";
	
		$result = $this->ExecuteData($sql);
		return $result->FetchRow();
	}
}
?>